﻿using System.ComponentModel.DataAnnotations;

namespace OnWork.DataCenter.BLL.Standard
{
    /// <summary>
    /// 结果解析配置对象 JsonToDataTableConfig
    /// </summary>
    public class JsonToDataTableConfig
    {
        /// <summary>
        /// 数据选择对象 主对象
        /// </summary>
        public string dataSelectToken { get; set; }

        public List<DataTableCol> Cols { get; set; }

        /// <summary>
        /// 解析类型
        /// </summary>
        public JsonToDataTableType Type { get; set; } = JsonToDataTableType.Default;
    }

    /// <summary>
    /// Json转DataTable类型
    /// </summary>
    public enum JsonToDataTableType
    {
        /// <summary>
        /// 默认 表格转换方法
        /// </summary>
        [Display(Name = "表达式")]
        Default = 0,

        /// <summary>
        /// 自定义的方法
        /// </summary>
        [Display(Name = "大佛寺中台接入")]
        DFS = 1,

        /// <summary>
        /// 郭家湾
        /// </summary>
        [Display(Name = "郭家湾中台接入")]
        GJW = 2,
        /// <summary>
        /// 闫家沟采煤机接入
        /// </summary>
        [Display(Name = "闫家沟采煤机接入")]
        YJG = 3,
    }
}